package cn.edu.nju.software.smartup.data;

import java.util.ArrayList;


public class action {
	public static int UP = 1;
	public static int DOWN = 2;
	public static int RIGHT = 3;
	public static int LEFT = 4;
	
	ArrayList<acceleration> record;
	private int state;
	
	public action(){
		state = 0;
	}
	public action(int state){
		this.state = state;
	}
	
	
	public int getState() {
		return state;
	}
	public void setState(int state) {
		this.state = state;
	}
	public boolean add(acceleration acce){
		return this.record.add(acce);
	}
	
	public ArrayList<acceleration> getRecord() {
		return record;
	}
	public void setRecord(ArrayList<acceleration> record) {
		this.record = record;
	}
	public String getDesc() {
		// TODO Auto-generated method stub
		if(state == UP){
			return "UP";
		}
		else if(state == DOWN){
			return "DOWN";
		}
		else if(state == RIGHT){
			return "RIGHT";
		}
		else if(state == LEFT){
			return "LEFT";
		}
		return "";
	}
}
